package com.haima.domin;

public class Woman {
    private String name;
    private int age;
    private Man man;

    public Woman() {
    }

    public Woman(String name, int age, Man man) {
        this.name = name;
        this.age = age;
        this.man = man;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Man getMan() {
        return man;
    }

    public void setMan(Man man) {
        this.man = man;
    }

    public void ManInfo() {
        System.out.println(name + "老公的姓名叫" + man.getName() + ",今年" + man.getAge() + "岁。");
    }
}
